<script setup>
import { ref } from 'vue';


let mySelect = ref()
let mySelects  = ref([])
</script>

<template>
  <!--1.选择一个-->
  <select name="single" v-model="mySelect">
    <option value="苹果">苹果</option> 
    <option value="香蕉">香蕉</option>
    <option value="榴莲">榴莲</option> 
    <option value="葡萄">葡萄</option>
  </select>
  <h2>您选择的水果是: {{mySelect}}</h2>

  <!--2.选择多个-->
  <select name="multi" v-model="mySelects" multiple>
    <option value="苹果">苹果</option> 
    <option value="香蕉">香蕉</option>
    <option value="榴莲">榴莲</option> 
    <option value="葡萄">葡萄</option>
  </select>
  <h2>您选择的水果是: {{mySelects}}</h2>
</template>

<style scoped>
</style>